<?php

use Illuminate\Database\Seeder;
use \Illuminate\Support\Facades\DB;

class AdminPermissionsSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        $permissions = [
            [
                'name' => 'users',
                'slug' => 'users',
                'http_path' => 'users',
            ],
            [
                'name' => 'banners',
                'slug' => 'banners',
                'http_path' => 'banners',
            ],
            [
                'name' => 'sellers',
                'slug' => 'sellers',
                'http_path' => 'sellers',
            ],
            [
                'name' => 'address',
                'slug' => 'address',
                'http_path' =>
                    "sys_province\nsys_city\nsys_district",
            ],
            [
                'name' => 'products',
                'slug' => 'products',
                'http_path' => 'products',
            ],
            [
                'name' => 'log_balance',
                'slug' => 'log_balance',
                'http_path' => 'log_balance',
            ],
            [
                'name' => 'forum',
                'slug' => 'forum',
                'http_path' =>
                    "gag_list\ncomments\nposts\nnews",
            ],
            [
                'name' => 'orders',
                'slug' => 'orders',
                'http_path' => 'orders',
            ],
            [
                'name' => 'help_center',
                'slug' => 'help_center',
                'http_path' => 'help_center',
            ],
            [
                'name' => 'exchange_rates',
                'slug' => 'exchange_rates',
                'http_path' => 'exchange_rates',
            ],
            [
                'name' => 'withdraws',
                'slug' => 'withdraws',
                'http_path' => 'withdraws',
            ],
            [
                'name' => 'pay_method',
                'slug' => 'pay_method',
                'http_path' => 'pay_method',
            ],
        ];

        foreach ($permissions as $data) {
            DB::table('admin_permissions')->insert($data);
        }
    }
}
